package com.shop.dingdongshoppingapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 短信发送表(TSmsLog)实体类
 *
 * @author makejava
 * @since 2022-06-29 17:41:53
 */
@Data
@NoArgsConstructor
@TableName(value = "t_sms_log")
public class SmsLog implements Serializable {
    private static final long serialVersionUID = -70068107758328900L;
    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * ⼿机号
     */
    private String phone;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 内容
     */
    private String info;
    /**
     * 标记位
     */
    private Integer flag;
    /**
     * 创建时间
     */
    private Date ctime;

    public SmsLog(String phone, Integer type, Integer flag, String info) {
        this.phone = phone;
        this.type = type;
        this.info = info;
        this.flag = flag;
        this.ctime = new Date();
    }
}

